<?php
namespace app\sw\controller;

use app\api\controller\Base;



/**
 * Class Index
 * @package app\index\controller
 */
class Department extends Base
{

    public function getList(){
        $this->checkUserLogin();
        $pageSize = input('pageSize', 20, 'intval');
        $pageNo = input('pageNo', 1, 'intval');

        $departmentList = $this->_query((new \app\sw\model\DepartmentModel()))->like('department_name', '', input())->order('id desc')->page($pageNo, false, false, $pageSize);    
        return $this->returnSuccess($departmentList, '获取成功'); 
    }
}